module Piston
  module Core
    class ToolView
      def initialize(pane)
        @pane = pane
      end

      def add(view)
        view.closed do
          @pane.children.remove view
        end

        @pane.children.add view
      end
      
    end
  end
end